#ifndef MYLABEL_H
#define MYLABEL_H

#include <QLabel>
#include <QMouseEvent>
#include <QTimerEvent>
#include <QTimer>
class mylabel : public QLabel
{
    Q_OBJECT
public:
    explicit mylabel(QWidget *parent = nullptr);

signals:

protected:
    //常见的事件
    void enterEvent(QEnterEvent *e);//鼠标进入
    void leaveEvent(QEvent *e);//鼠标离开

    void mousePressEvent(QMouseEvent *e);//鼠标按下
    void mouseReleaseEvent(QMouseEvent *e);//鼠标释放
    void mouseMoveEvent(QMouseEvent* e);//鼠标移动

    void timerEvent(QTimerEvent* ev);
    bool event(QEvent *ev);

    bool eventFilter(QObject* obj,QEvent* ev);
private:
    int id;
};

#endif // MYLABEL_H
